DEFINITION MODULE WindTool;

(*
Window Tools.

UK __DATE__ __TIME__
*)

(*DEF_SWITCHES*)

FROM AES     IMPORT TreePtr,ObjectIndex;
FROM WindMgr IMPORT WindowElement;
FROM RcMgr   IMPORT GRect,GPnt;
FROM PORTAB  IMPORT UNSIGNEDWORD,SIGNEDWORD;

(* WFKind *)

PROCEDURE SetKind(Handle: SIGNEDWORD; Kind: WindowElement);

(* WFName *)

PROCEDURE SetName(Handle: SIGNEDWORD; VAR Name: ARRAY OF CHAR);

(* WFInfo *)

PROCEDURE SetInfo(Handle: SIGNEDWORD; VAR Info: ARRAY OF CHAR);

(* WFWorkXYWH *)

PROCEDURE GetWorkXYWH(Handle: SIGNEDWORD; VAR Rect: GRect);

(* WFCurrXYWH *)

PROCEDURE SetCurrXYWH(Handle: SIGNEDWORD; VAR Rect: GRect);

PROCEDURE GetCurrXYWH(Handle: SIGNEDWORD; VAR Rect: GRect);

(* WFPrevXYWH *)

PROCEDURE GetPrevXYWH(Handle: SIGNEDWORD; VAR Rect: GRect);

(* WFFullXYWH *)

PROCEDURE GetFullXYWH(Handle: SIGNEDWORD; VAR Rect: GRect);

(* WFHSlide *)

PROCEDURE SetHSlide(Handle: SIGNEDWORD; Pos: UNSIGNEDWORD);

PROCEDURE GetHSlide(Handle: SIGNEDWORD): UNSIGNEDWORD;

(* WFVSlide *)

PROCEDURE SetVSlide(Handle: SIGNEDWORD; Pos: UNSIGNEDWORD);

PROCEDURE GetVSlide(Handle: SIGNEDWORD): UNSIGNEDWORD;

(* WFTop *)

PROCEDURE SetTop(Handle: SIGNEDWORD);

PROCEDURE GetTop(): SIGNEDWORD;

PROCEDURE GetTopAndBelow(VAR Top  : SIGNEDWORD;
                         VAR Id   : SIGNEDWORD;
                         VAR Below: SIGNEDWORD);

(* WFFirstXYWH *)

PROCEDURE GetFirstXYWH(Handle: SIGNEDWORD; VAR Rect: GRect);

(* WFNextXYWH *)

PROCEDURE GetNextXYWH(Handle: SIGNEDWORD; VAR Rect: GRect);

(* WFNewDesk *)

PROCEDURE SetNewDesk(PTree: TreePtr; Index: ObjectIndex);

PROCEDURE GetNewDesk(): TreePtr;

(* WFHSlSize *)

PROCEDURE SetHSlSize(Handle: SIGNEDWORD; Size: SIGNEDWORD);

PROCEDURE GetHSlSize(Handle: SIGNEDWORD): SIGNEDWORD;

(* WFVSlSize *)

PROCEDURE SetVSlSize(Handle: SIGNEDWORD; Size: SIGNEDWORD);

PROCEDURE GetVSlSize(Handle: SIGNEDWORD): SIGNEDWORD;

(* WFScreen *)



(* WFTopAttrb *)

PROCEDURE SetTAttrb(Handle: SIGNEDWORD; IsTop: BOOLEAN);

(* WFColor *)



(* WFSizTop *)

PROCEDURE SetSizTop(Handle: SIGNEDWORD; VAR Rect: GRect);

(* WFDColor *)



(* WFTopAp *)



(* WFOwner *)

PROCEDURE GetOwner(    Handle: SIGNEDWORD;
                   VAR Open  : BOOLEAN;
                   VAR Above : SIGNEDWORD;
                   VAR Below : SIGNEDWORD): SIGNEDWORD;

(* WFBack *)

PROCEDURE SetBack(Handle: SIGNEDWORD);

(* WFBEvent *)

PROCEDURE SetBEvent(Handle: SIGNEDWORD; OnOff: BOOLEAN);

PROCEDURE GetBEvent(Handle: SIGNEDWORD): BOOLEAN;

(* WFBottom *)

PROCEDURE SetBottom(Handle: SIGNEDWORD);

PROCEDURE GetBottom(): SIGNEDWORD;

(***************************************************************************)

PROCEDURE BeginUpdate;

PROCEDURE EndUpdate;

PROCEDURE ChkUpdate(): BOOLEAN;

PROCEDURE BeginMouseControl;

PROCEDURE EndMouseControl;

PROCEDURE ChkMCtrl(): BOOLEAN;

PROCEDURE BeginEmergency;

PROCEDURE EndEmergency;

(***************************************************************************)

TYPE DrawProc = PROCEDURE(VAR GRect);

PROCEDURE RedrawWindow(    Window: SIGNEDWORD;
                       VAR Clip  : GRect;
                           Draw  : DrawProc);

END WindTool.
